A PowerTime Object contains a date and time value, allowing easy calculations. The internal representation emulates the Windows FILETIME structure as a quad-integer. This value represents the number of 100-nanosecond intervals since January 1, 1601. A nanosecond is one-billionth of a second. You create a PowerTime object the same way you create other objects, but using a predefined internal class and a predefined internal interface. LOCAL MyTime AS IPowerTime LET MyTime = CLASS "PowerTime" Once you have created a PowerTime object, you can manipulate it using the member methods. The IPowerTime interface is DUAL -- member methods may be referenced using either Direct or Dispatch form. |
|
Remarks |
The Dispatch ID (DispID) for each member method is displayed within angle brackets. An immediate use for the PowerTime Object is the built-in numeric equate %PB_COMPILETIME. Each time you compile your program, this equate is filled with the current date and time of the compilation in PowerTime binary format. You can use the PowerTIME Class to convert it to a text equivalent for use in your application. LOCAL Built AS IPowerTime LET Built = CLASS "PowerTime" Built.FileTime = %PB_COMPILETIME MSGBOX Built.DateString MSGBOX Built.TimeString POWERTIME Methods |